AC_INIT(LibBancoSL, 1.0.1, alcione.sombra@gmail.com, libbancosl, http://www.alcionesytes.net)
AC_PREREQ([2.50])
AC_CONFIG_AUX_DIR([.])
AM_INIT_AUTOMAKE([1.11 gnu -Wall dist-xz])
AC_CONFIG_MACRO_DIR([m4])
m4_pushdef([AC_INCLUDES_DEFAULT], [$1])
AC_COPYRIGHT([Alcione Ferreira])
AC_REVISION([$Revision: 1.0.1 $])

AC_CONFIG_HEADERS([src/configbsl.h])
AC_PROG_CXX
#LT_INIT([disable-static])
AC_LANG([C++])

######################################################################
# DOXYGEN SUPPORT
######################################################################

DX_HTML_FEATURE(ON)
DX_CHM_FEATURE(OFF)
DX_CHI_FEATURE(OFF)
DX_MAN_FEATURE(OFF)
DX_RTF_FEATURE(OFF)
DX_XML_FEATURE(OFF)
DX_PDF_FEATURE(ON)
DX_PS_FEATURE(ON)

DX_INIT_DOXYGEN([$PACKAGE_NAME],[doxygen.cfg],[doc])

######################################################################

AM_PROG_LIBTOOL
AC_LIBTOOL_WIN32_DLL
AC_CHECK_TOOL(AR, ar, ar)
AC_PREFIX_DEFAULT([/usr])
AC_CHECK_TOOL(DLLTOOL, dlltool, dlltool)
AC_CHECK_TOOL(DLLWRAP, dllwrap, dllwrap)
AC_CHECK_TOOL(WINDRES, windres, windres)
AC_SUBST([AM_CXXFLAGS])

AC_SUBST([SL_INCLUDE],["-I../sqlite/"])
AC_SUBST([SL_LDADD],["../sqlite/libsqlite3.la"])

AC_HEADER_STDC
AC_CHECK_HEADERS([iostream string fstream vector])
AC_CHECK_HEADERS([ctime cstdio cstdlib ctype.h ltdl.h dlfcn.h])
AC_SEARCH_LIBS([lt_dlopen], [ltdl])
AC_SEARCH_LIBS([dlopen], [dl])

AC_SUBST([LIBBANCOSL_SO_VERSION], [1:0:0])
AC_SUBST([LIBBANCOSL_API_VERSION], [1.0])

AC_CONFIG_SUBDIRS([sqlite])

AC_CONFIG_FILES([Makefile src/Makefile libbancosl-${LIBBANCOSL_API_VERSION}.pc:libbancosl.pc.in])
AC_OUTPUT
